package com.zby.demo.dao;

import com.zby.demo.entity.Course;
import com.zby.demo.entity.Teacher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author ChrisPhantom
 * @CreateDate 2020/12/21 20:43
 */

@Mapper
public interface TeacherDao {
    //添加教师
    void addTeacher(@Param("teacher") Teacher teacher);

    //增加教师教授课程
    void addTeachCourse(@Param("TeacherID") String TeacherID, @Param("CourseID") String CourseID);

    //删除教师授课课程
    void deleteTeachCourseByID(@Param("TeacherID") String TeacherID);

    //删除教师
    void deleteTeacher(@Param("TeacherID") String TeacherID);

    //按教师ID修改教师信息(不包含密码)
    void updateTeacherInfo(@Param("teacher") Teacher teacher);

    //更改教师教授课程
    void updateTeacherTeachCourse(@Param("TeacherID") String TeacherID, @Param("CourseID") String CourseID);

    //修改教师密码
    void updateTeacherPassword(@Param("TeacherID") String TeacherID, @Param("Password") String Password);

    //查询所有教师
    List<Teacher> queryAllTeacher();

    //按教师ID查询教师
    Teacher quertyTeacherByID(@Param("teacherId") String teacherId);

    //按教师ID查询其教授的课程
    Course queryTeachCourseByID(@Param("teacherId") String teacherId);
}
